home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Meeting Pearls 4
/
Meeting Pearls Vol. IV (1996)(GTI - Schatztruhe)[!].iso
/
Pearls
/
libs
/
bgui
/
Docs
/
labelclass.doc
< prev
next >
Wrap
Text File
|
1995-05-21
|
7KB
|
210 lines
File: labelclass.doc
Description: Labelclass documentation.
Copyright: (C) Copyright 1994-1995 Jaba Development.
(C) Copyright 1994-1995 Jan van den Baard.
All Rights Reserved.
------------------------------------------------------------------------------
TABLE OF CONTENTS
labelclass/--background--
labelclass/Methods
labelclass/Attributes
labelclass/--background-- labelclass/--background--
NAME
Class: labelclass
Superclass: IMAGECLASS
Include File: <libraries/bgui.h>
FUNCTION
To provide a general labeling image. It supports underscoring and
placement of the label simular to the gadtools gadget labels. It has
been constructed in a way to make multi-line labels possible in the
future in a compatible way
labelclass/Methods labelclass/Methods
NEW METHODS
IM_EXTENT -- This method will ask a labelclass object for the amount
of pixels the label extends the image bounding box. Normally
this method is only used by the baseclass which handles labels
but in some cases you might need this method for yourself. The
method uses the following custom message structure:
struct impExtent {
ULONG MethodID; /* IM_EXTENT */
struct RastPort *impe_RPort;
struct IBox *impe_Extent;
struct {
UWORD *Width;
UWORD *Height;
} impe_LabelSize;
UWORD impe_Flags;
};
impe_RPort -- This must point to the RastPort in which the
label is to be rendered. It is copied to an internal
buffer and on that copy font changes and calculations
will be made so the RastPort you pass here remains
unchanged. This must be valid.
impe_Extent -- This field is used to store the label
extentions. The label extentions are simply the number
of pixels which the label extends the image bounding
box in either direction. The Left and Top fields will
always be smaller than or equal to zero. The Width and
Height fields will always be equal to or bigger than
zero. This must be valid.
impe_LabelSize -- In this field the total pixel width and
height of the label is stored. This must be valid.
impe_Flags -- This field may contain any of the following
flags:
EXTF_MAXIMUM -- Normally when this method is called
the returned values are the extentions as they
are at the moment you call this method. When
this flag is set the returned values are the
maximum possible extentions the label can
have.
CHANGED METHODS
None.
SEE ALSO
baseclass.doc
labelclass/Attributes labelclass/Attributes
NAME
LAB_TextAttr -- ( struct TextAttr * )
FUNCTION
Set or get the font that is to be used to render the label. Please
note that the font you pass here is opened with OpenFont() so it must
be in memory already.
Default is NULL. Applicability is (ISG).
NAME
LAB_Style -- ( UWORD )
FUNCTION
Set or get the style as defined in <graphics/text.h> which is used to
render the font. Note that this style overrides the style of the font
passed by the LAB_TextAttr attribute.
Default is FS_NORMAL. Applicability is (ISG).
SEE ALSO
LAB_TextAttr, <graphics/text.h>
NAME
LAB_Underscore -- ( UBYTE )
FUNCTION
Set or get the character that marks the character to be underscored.
Normally the underscored character is used to mark a key which can be
used to control the gadget. Example:
LAB_Underscore, '@'
Will underscore the 'O' character in the following label:
"@Open"
Default is 0. Applicability is (ISG).
NAME
LAB_Place -- ( ULONG )
FUNCTION
Set or get the place relative to the image bounding box at which the
label is rendered. The following places are possible:
PLACE_IN -- The label is cenetered inside the image bounds.
PLACE_LEFT -- The label is placed left of the image bounds and
cenetered vertically.
PLACE_RIGHT -- The label is placed right of the image bounds
and cenetered vertically.
PLACE_ABOVE -- The label is placed above the image bounds and
centered horizontally.
PLACE_BELOW -- The label is placed below the image bounds and
centered horizontally.
Default is PLACE_IN. Applicability is (ISG).
NAME
LAB_Label -- ( STRPTR )
FUNCTION
Set or get the actual text for the label.
Default is NULL. Applicabillity is (ISG).
NAME
LAB_Flags -- ( ULONG )
FUNCTION
Set or get the flag settings of the label. The following flags are
possible:
LABF_HIGHLIGHT -- Normally the label is rendered in the
TEXTPEN or FILLTEXTPEN color. When this flag is set
the label is rendered in the HIGHLIGHTTEXTPEN color.
LABF_HIGH_USCORE -- This is the same as LABF_HIGHLIGHT only
now the color of the underscoring is affected.
Default is 0. Applicability is (ISG).
SEE ALSO
LAB_Highlight, LAB_HighUScore, <intuition/screens.h>
NAME
LAB_Highlight -- ( BOOL )
FUNCTION
Set or clear the LABF_HIGHLIGHT flag.
Default is FALSE. Applicability is (ISG).
SEE ALSO
LAB_Flags
NAME
LAB_HighUScore -- ( BOOL )
FUNCTION
Set or clear the LABF_HIGH_USCORE flags.
Default is FALSE. Applicability is (ISG).
SEE ALSO
LAB_Flags
NAME
LAB_Pen, LAB_DriPen, LAB_SelectedPen, LAB_SelectedDriPen -- ( UWORD )
** V39 **
FUNCTION
To specify the colors of a label. The LAB_xxPen attributes must be
used to specify the pen number of the used color. The LAB_xxxDriPen
attributes must be used to specify the DrawInfo pen number to use.
You can specify two colors. The text color of the label in a normal
unselected state and the text color of the label in selected state.
Specifying ~0 (-1) for the pens will deactivate the text color and
the class will fall back to the default coloring sceme.
Defaults are ~0. Applicability is (ISG).